package com.fuwenhao.fwhfastdfs.taobaoFdfs;

import com.github.tobato.fastdfs.FdfsClientConfig;
import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.github.tobato.fastdfs.service.AppendFileStorageClient;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.context.annotation.Import;
import org.springframework.jmx.support.RegistrationPolicy;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.misc.BASE64Decoder;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @ClassName TaoBaoFdfs
 * @Description TODO
 * @Author fwh
 * @Date 2019/11/26 15:26
 * @Version 1.0
 */
@RestController
@Configuration
@Import(FdfsClientConfig.class)
// 解决jmx重复注册bean的问题
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
public class TaoBaoFdfs {
    protected static Logger LOGGER = LoggerFactory.getLogger(TaoBaoFdfs.class);

    @Autowired
    protected AppendFileStorageClient storageClient;

    @Autowired
    private FastFileStorageClient fastFileStorageClient;

//    @Value("#{'${fdfs.tracker-list}'}")
//    private String serverIp;

    /**
     * 断点传输
     *
     * @return
     */
    @PostMapping("/uploadPath")
    public String uploadPath() {
        final AtomicInteger failCount = new AtomicInteger(0);
        final AtomicInteger count = new AtomicInteger(0);
        int totalCount = 20;
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(5);
        executor.afterPropertiesSet();
        for (int i = 0; i < totalCount; i++) {
            executor.execute(new Runnable() {
                @Override
                public void run() {
                    try {
                        URL path = TaoBaoFdfs.class.getResource("/images/gs.jpg");
                        byte[] bytes1 = FileUtils.readFileToByteArray(new File(path.getPath()));
//                        String test1 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgr/wAARCACJAIMDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD47/4JI3y2X7S3icb8NN8NLqMcdQZIcj8RX61/tg20MHw+8NQqvz6AumowPYS2+2vyG/4JJxvcftV6nCfuyeDGjP0M8IP6V+s37Xnia3X4n698OrxyYf8AhHdNlTJ+7MsJ2t+leNj7SxSXc/QOHqcfqtJR/mf4H56/8FBtUl/4cb/CWwicYu/2oPEU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bIhUjlPKTJIPxOJK21n2tJHiRxNVts5zR2yrq6aOaPTF1p2yDc0NAi4e4PGPVZKl09dWyH6PYqhsjuBknlYPi4uLv1XVu5FBZaRc+PDOaV1BSWBkE+pXSTsmLttLRxl7OyNx3u4Fwx5AeOVkafpCt9S+uipaCrklo4g4RNaNzuGC3aCSMOIaeHnyC3Cekgq9nXwMk2Elu9ucZGD8iQvs00O17RG0B4w7AxlV06b+sviYlaSNStuq7lcrtHSssr46aSRuJ3l2Gx7C7eTtxx4AYPf5LdFa0tNFR0sNNC3bFCxrGDOcNAwFdZXEdbT6JREXTgREQBERAEREAREQBERAEREB8kZGO5apbej/AE5aa2Srp7e1873E7piZNvHPZDuARFFym/p3ya6NsAAHAKURSOBERAEREAREQBERAEREAREQH//Z";
                        BASE64Decoder decoder = new BASE64Decoder();
                        byte[] bytes = decoder.decodeBuffer(test2);
//                        byte[] bytes = test2.getBytes();
                        StorePath storePath = storageClient.uploadFile(null, new ByteArrayInputStream(bytes),
                                bytes.length, "jpg");
                        String fullPath = storePath.getFullPath();
                        String group = storePath.getGroup();
                        String path1 = storePath.getPath();
                        System.out.println("fullPath:" + fullPath);
                        System.out.println("group:" + group);
                        System.out.println("path1:" + path1);
//                        System.out.println("serverip: "+serverIp);
                    } catch (Exception e) {
                        e.printStackTrace();
                        failCount.incrementAndGet();
                    } finally {
                        count.incrementAndGet();
                    }

                }
            });

        }
        while (count.get() < totalCount) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                return null;
            }
        }
        executor.destroy();
        LOGGER.debug("total count: {}", count.get());
        LOGGER.debug("fail count: {}", failCount.get());
        return null;
    }

    /**
     * 直接传输
     */
    @PostMapping("/fileUpload")
    public String fileUpload() throws IOException {
        String test2 = "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQw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5fcLe3rWv75oh7QPj4eoKxFr0DqTUbQaO1yiJ3Hr5v2bPiefpldG0n0IS2wisuN6kjrCC3ZRtaWAHmCXA7vgE490vpdzYxZI1v6ZBrg9oc0gtIyCsVqCopqa2yOndHlwAax5HacDluB38e5bvS9G9BBTxQT3S6TxRMDGs61sfAcuLGg/NZS16M09Z6kVVHbIhUjlPKTJIPxOJK21n2tJHiRxNVts5zR2yrq6aOaPTF1p2yDc0NAi4e4PGPVZKl09dWyH6PYqhsjuBknlYPi4uLv1XVu5FBZaRc+PDOaV1BSWBkE+pXSTsmLttLRxl7OyNx3u4Fwx5AeOVkafpCt9S+uipaCrklo4g4RNaNzuGC3aCSMOIaeHnyC3Cekgq9nXwMk2Elu9ucZGD8iQvs00O17RG0B4w7AxlV06b+sviYlaSNStuq7lcrtHSssr46aSRuJ3l2Gx7C7eTtxx4AYPf5LdFa0tNFR0sNNC3bFCxrGDOcNAwFdZXEdbT6JREXTgREQBERAEREAREQBERAEREB8kZGO5apbej/AE5aa2Srp7e1873E7piZNvHPZDuARFFym/p3ya6NsAAHAKURSOBERAEREAREQBERAEREAREQH//Z";
        BASE64Decoder decoder = new BASE64Decoder();
        byte[] bytes = decoder.decodeBuffer(test2);
//                        byte[] bytes = test2.getBytes();
        StorePath storePath = fastFileStorageClient.uploadFile(null, new ByteArrayInputStream(bytes), bytes.length, "jpg");
        String fullPath = storePath.getFullPath();
        return fullPath;
    }

    /**
     * 清除文件
     */
    @PostMapping("/deleteFile")
    public void deleteFile(String filePath) {
        fastFileStorageClient.deleteFile(filePath);
        System.out.println("successfully");
    }

}
